Sprite Properties
The following constants represent the different properties of a sprite. When you call
SetSpriteProperty
to set a sprite property, you pass one of these constants to specify the property you wish to modify.
enum {
kSpritePropertyMatrix = 1,
kSpritePropertyImageDescription = 2,
kSpritePropertyImageDataPtr = 3,
kSpritePropertyVisible = 4,
kSpritePropertyLayer = 5,
kSpritePropertyGraphicsMode = 6,
kSpritePropertyImageIndex = 100
};
Constant descriptions
-
kSpritePropertyMatrix
-
A matrix of type
MatrixRecord
that defines the sprite's display coordinate system.
-
kSpritePropertyImageDescription
-
An image description handle that describes the sprite's image data. This must be valid as long as the sprite uses it. The caller owns the storage. The sprite toolbox does not copy this data.
-
kSpritePropertyImageDataPtr
-
A pointer to the sprite's image data. This must be valid as long as the sprite uses it. The caller owns the storage. The sprite toolbox does not copy this data.
-
kSpritePropertyVisible
-
A Boolean value that indicates whether the sprite is visible.
-
kSpritePropertyLayer
-
A
short
integer value that defines the sprite's layer. You set this property to
kBackgroundSpriteLayerNum
to designate the sprite as a background sprite.
-
kSpritePropertyGraphicsMode
-
A
ModifierTrackGraphicsModeRecord
value that specifies the graphics mode to be used when drawing the sprite.
-
kSpritePropertyImageIndex
-
In a sprite track, the index of the sprite's image in the pool of shared images.
© 1999 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Next |